package com.wpp.service.impl;

import com.wpp.dao.StudentDao;
import com.wpp.dao.impl.StudentDaoImpl;
import com.wpp.domain.Student;
import com.wpp.service.Studentservice;
import com.wpp.util.FactoryMode;
import org.springframework.context.ApplicationContext;


import java.util.List;

/*
 * 业务实现类
 * */
public class StudentserviceImpl implements Studentservice {

    //第一作者方式pass
    //StudentDao studentDAO = new StudentDaoImpl();

    //第二种方式
    StudentDaoImpl studentdao = (StudentDaoImpl) FactoryMode.getBean("studentdao");


    public List<Student> findALL() {
        List<Student> studentList = studentdao.findAll();
        return studentList;
    }
}
